<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<div id="contentContainer_1" class="mod-container mod-grid-c2b container apply-contentContainer"
                             data-reactid=".0.$root_1.1:$rootContainer_1.$leftContainer_1.0.$contentContainer_1">
                            <div class="mod-refund-status refundStatusPc apply-refundStatusPc clearfix" style="overflow: hidden"
                                 id="refundStatusPc_1"
                                 data-reactid=".0.$root_1.1:$rootContainer_1.$leftContainer_1.0.$contentContainer_1.$refundStatusPc_1">
                                <div class="content"
                                     data-reactid=".0.$root_1.1:$rootContainer_1.$leftContainer_1.0.$contentContainer_1.$refundStatusPc_1.1">
                                    <p class="title-wrap"
                                       data-reactid=".0.$root_1.1:$rootContainer_1.$leftContainer_1.0.$contentContainer_1.$refundStatusPc_1.1.0">
                                        <c:if test="${primaryReturn.returnType == 1}">
                                        <span class="title">请处理退货申请</span>
                                        </c:if>
                                        <c:if test="${primaryReturn.returnType == 0}">
                                            <span class="title">请处理退款申请</span>
                                        </c:if>
                                        <span class="mod-timer-pc time">
                                        <img src="//img.alicdn.com/tps/TB1b74uPXXXXXa2XFXXXXXXXXXX-34-34.png" alt="">
                                        <span id="returnOfGoodsTime">还剩2天23时47分</span></span>
                                    </p>
                                    <div class="description">${primaryReturn.returnType==1?'请及时联系买家协商退货事宜':'请及时联系买家进行退款'}
                                    </div>
                                    <a class="link" target="_blank"></a>
                                </div>
                            </div>
                            <div id="refundStatusPcSeparateLine_6"  class="mod-separate-line separateLine apply-refundStatusPcSeparateLine lineSeparator"></div>
                            <div id="commonQuestionContainer_22@1"  class="mod-info-list infoList apply-commonQuestionContainer">
                                <div class="description-wrap">
                                    <div class="line-wrap">
                                        <div class="icon-name"  style="background-image:url(//img.alicdn.com/tps/TB1OtRhQXXXXXX4XFXXXXXXXXXX-51-51.png);"></div>
                                        <span>
                                            <span></span>
                                        </span>
                                        <span
                                            class="flexcell">${primaryReturn.returnType==1?'如果您同意，请点击“同意退货”，将正确退货地址给买家。':'如果您同意，钱款会返回给买家，该订单结束'}</span>
                                    </div>
                                    <div class="line-wrap">
                                        <div class="icon-name" style="background-image:url(//img.alicdn.com/tps/TB1OtRhQXXXXXX4XFXXXXXXXXXX-51-51.png);"></div>
                                        <span><span></span>
                                        </span>
                                        <span class="flexcell">如果您拒绝，买家可以申请客服介入</span>
                                    </div>
                                    <div class="line-wrap">
                                        <div class="icon-name" style="background-image:url(//img.alicdn.com/tps/TB1OtRhQXXXXXX4XFXXXXXXXXXX-51-51.png);"></div>
                                        <span>
                                            <span></span>
                                        </span>
                                        <span class="flexcell">如果您逾期未处理申请，视作同意买家申请。${primaryReturn.returnType==1?'系统会自动将当前交易的退货地址发给买家':'系统会自动将当前交易的钱款返回'}</span>
                                    </div>
                                </div>
                            </div>
                            <div class="mod-fullbtnlistpc " id="disputeDetailfullButtonContainer_44"
                                 data-reactid=".0.$root_1.1:$rootContainer_1.$leftContainer_1.0.$contentContainer_1.$disputeDetailfullButtonContainer_44">
                                    <div class="center button-item highlight" id="agreeApply">
                                        <span>${primaryReturn.returnType==1?'同意退货款':'同意退款'}</span>
                                    </div>

                                    <div class="center button-item normal" id="refuseApply">
                                        <span>${primaryReturn.returnType==1?'拒绝退货款申请':'拒绝退款'}</span>
                                    </div>

                            </div>
                            <div id="DisputeDetailOpBtList_4@1" class="mod-opbuttonlistpc"
                                 data-reactid=".0.$root_1.1:$rootContainer_1.$leftContainer_1.0.$contentContainer_1.$DisputeDetailOpBtList_4@1">
                                <span data-reactid=".0.$root_1.1:$rootContainer_1.$leftContainer_1.0.$contentContainer_1.$DisputeDetailOpBtList_4@1.0">您还可以：</span><span
                                    class="link littleMargin"
                                    data-reactid=".0.$root_1.1:$rootContainer_1.$leftContainer_1.0.$contentContainer_1.$DisputeDetailOpBtList_4@1.1:$0">申请客服介入</span>
                            </div>
                        </div>


 <script>
     $(document).ready(function () {
         var beforTime = $("#statusTime").val();
         window.setInterval(function () {
             showCountDown(beforTime, "returnOfGoodsTime");
         }, 1000);
     });

     function showCountDown(timeStr, idName)
     {
         //当前时间
         var startTime = new Date();
         //结束时间
         var endTime =  new Date(timeStr);
         endTime.setDate(endTime.getDate() + 3);
         //算出中间差，以毫秒数返回.
         var countDown = (endTime.getTime()-startTime.getTime());
         //获取天数
         var oDay = parseInt(countDown/1000/60/60/24);
         //获取小时数
         var oHour = parseInt(countDown/1000/60/60%24);
         //获取分钟数
         var oMinute = parseInt(countDown/1000/60%60);
         //获取秒数
         var oSecond = parseInt(countDown/1000%60);
         //获取标签
         var txt = document.getElementById(idName);
         //输出时间
         txt.innerHTML = "还剩"+num(oDay)+"天"+num(oHour)+"时"+num(oMinute)+"分"+num(oSecond)+"秒";
     }
     function num(n){
         return n < 10 ?'0'+n :n;
     };
 </script>
